import request from '@/utils/request'

// 根据目录id查询信息
export function getHelpContentByMenuId(menuId) {
  return request({
    url: '/ec/helpContent/getInfoByMenuId/' + menuId,
    method: 'get'
  })
}

// 政策法规详情
export function getMaterialHtmlById(id) {
  return request({
    url: '/ec/materialHtml/getDetails/' + id,
    method: 'get'
  })
}

// 有帮助数量+1
export function addHelpfulNum(id) {
  return request({
    url: '/ec/helpContent/addHelpfulNum/' + id,
    method: 'get'
  })
}

// 无帮助数量+1
export function addUnHelpfulNum(id) {
  return request({
    url: '/ec/helpContent/addUnHelpfulNum/' + id,
    method: 'get'
  })
}

// 根据关键字搜索信息
export function getInfoByKeyword(query) {
  return request({
    url: '/ec/helpContent/getInfoByKeyword/',
    method: 'get',
    params: query
  })
}
